package tech.yqyl.solo.processor;

import tech.yqyl.solo.BlogInfo;
import tech.yqyl.solo.BlogProcessor;

/**
 * @className: BlogImageProcessor
 * @description:
 * @author: caoyangjie
 * @date: 2024/9/3
 **/
public class BlogImageProcessor extends AbstractProcessor implements BlogProcessor {

    @Override
    public boolean filter() {
        return true;
    }

    @Override
    public void process(BlogInfo blog) {
        String replaceString =  blog.getArticle().getArticleContent().replaceAll("https://caoyangjie.gitee.io/","https://gitbook.luckycxy.com/")
                .replaceAll("undefined", "");
        blog.getArticle().setArticleContent(replaceString);
    }
}
